angular.module('app.routes', [])

    .config(function ($stateProvider, $urlRouterProvider) {

        // Ionic uses AngularUI Router which uses the concept of states
        // Learn more here: https://github.com/angular-ui/ui-router
        // Set up the various states which the app can be in.
        // Each state's controller can be found in controllers.js
        $stateProvider


            .state('dictListPage', {
                url: '/dictListPage',
                templateUrl: 'templates/dictListPage.html',
                controller: 'dictListPageCtrl'
            })

            .state('wordListPage', {
                url: '/wordListPage/:dictId',
                templateUrl: 'templates/wordListPage.html',
                controller: 'wordListPageCtrl'
            })

            .state('wordDetailPage', {
                parent: 'wordListPage',
                url: '/wordDetailPage/:index',
                params: {
                    words: [],
                    index: 0
                },
                views:{
                    '@':{
                        templateUrl: 'templates/wordDetailPage.html',
                        controller: 'wordDetailPageCtrl'
                    }
                }
            })
        $urlRouterProvider.otherwise('/dictListPage')
    });